package cc.codeshop.activitylaunch;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.Log;

public class LoggableActivity extends Activity {
	
	protected String tag = getClass().getSimpleName();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.v(tag, "onCreate");
		setTitle(tag);
		Log.v(tag, "taskId = " + getTaskId() + ", hashCode = " + hashCode());
	}
	
	@Override
	protected void onNewIntent(Intent intent) {
		super.onNewIntent(intent);
		Log.v(tag, "onNewIntent");
		Log.v(tag, "taskId = " + getTaskId() + ", hashCode = " + hashCode());
	}
	
	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
		Log.v(tag, "onConfigurationChanged");
	}
	
	@Override
	protected void onRestoreInstanceState(Bundle savedInstanceState) {
		super.onRestoreInstanceState(savedInstanceState);
		Log.v(tag, "onRestoreInstanceState");
	}
	
	@Override
	protected void onRestart() {
		super.onRestart();
		Log.v(tag, "onRestart");
	}
	
	@Override
	protected void onStart() {
		super.onStart();
		Log.v(tag, "onStart");
	}
	
	@Override
	protected void onResume() {
		super.onResume();
		Log.v(tag, "onResume");
	}
	
	@Override
	protected void onPause() {
		super.onPause();
		Log.v(tag, "onPause");
	}
	
	@Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		Log.v(tag, "onSaveInstanceState");
		outState.putInt("aaa", 123);
	}
	
	@Override
	protected void onStop() {
		super.onStop();
		Log.v(tag, "onStop");
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		Log.v(tag, "onDestroy");
	}
	
}
